ansible: refresh cross compiler, include new 4.9.4 toolchain & new selector script #1237
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
OK, so this is a bit of a major change in a number of ways.
Firstly, I've included a new cross-compile toolchain, cloned from https://github.com/rvagg/rpi-newer-crosstools, that included GCC 4.9.4 and also bundles in a more modern binutils, 2.28. So, we get past the 4.9.3 hurdle we are stuck with just using the toolchain that Raspbian uses (that we've been using https://github.com/raspberrypi/tools), plus we get to throw in a binutils that OpenSSL 1.1.1 is going to need when we upgrade Node 10 to it as per #1229. This gives us Jessie+ compatibility, we drop Wheezy but that was the plan anyway.
The only other option I've been able to come up with is to jump in to gcc-6 and have Stretch+ compatibility, but even then we have to use a custom toolchain since Raspbian is still using 4.8.3 for compiling even for their Stretch binaries ... as far as I can tell anyway!
The next thing this PR does is introduce a new
cc-selector.sh
script and gets rid of the oldcc-armv6-4.8.sh
etc. scripts. Combined with the new labels for the cross compiler worker in Jenkins and the version selector script there's very little logic in Jenkins anymore to select the right compiler.We use the labels
cross-compiler-armv6-gcc-4.8
,cross-compiler-armv6-gcc-4.9.4
,cross-compiler-armv7-gcc-4.8
,cross-compiler-armv7-gcc-4.9.4
for the cross compiler machine, all 4 are selected for the node-cross-compile job, but only 2 get selected depending on the version of Node (version selector script does this). Then when compiling, we call. ./cc-selector.sh <label>
with the current label and the selector script figures out which arm version and which gcc version and configures theCC
,CPP
, etc. variables. (There's also also a working gcc-4.9 label in there if we want to revert back to the Raspbian 4.9.3 toolchain for some reason).On top of all of that, I've brought online two new cross-compiler machines, one test and one release (will make a new issue to discuss release cross-compiling ..), and they are Ubuntu 16.04 machines, instead of the current 14.04 that we have for our single current cross-compiler. I've also set up JNLP style configurations for them so they operate essentially like other test machines so the cross-compiler configuration is now just a simple extension of playbooks/jenkins/worker/create.yml that installs the toolchains and scripts. We're also bringing in ppa:ubuntu-toolchain-r/test to get the host compilers matching 4.9.4 as well, although it doesn't seem to matter if they are 4.9.3 while the cross compiler is 4.9.4, I don't really understand what V8 is doing with the host vs cross.
This has been active over the weekend in node-cross-compile, we've been building
master
(10+) on the new 4.9.4 and testing those on Jessie & Stretch Pi's without a hitch (well .. except for all the hitches it took to get this working). I've just brought online the second test cross-compiler and it seems to be happy, so we may want to consider upgrading the azure one to 16.04 sometime and bring it into harmony with this.I suspect @joaocgreis is going to be the only one to grok all of this, sorry.